<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
	.STYLE1 {
		color: #e1e2e3;
		font-size: 12px;
	}
	</style>
	
	<script type="text/javascript">
	function checkIsInteger(str)   
	{    
	    if(/^(\-?)(\d+)$/.test(str))   
	        return true;   
	    else  
	        return false;   
	}
	function check()
	{
	  var doorSystem = document.getElementById('doorSystem').value;
	  var doorTic = document.getElementById('doorTic').value;
	  var doorChn = document.getElementById('doorChn').value;
	  var doorDelay = document.getElementById('doorDelay').value;
	  
	  if(checkIsInteger(doorSystem)&&checkIsInteger(doorTic)&&checkIsInteger(doorChn)&&checkIsInteger(doorDelay))
	  {
	    Door_update.submit();
	    return true;
	  }
	  else
	  {
	    alert("系统编号、Tic号、Chn号、开门延迟时间请输入数值类型!");
	    return false;
	  }
	}
	</script>
  </head>
  
  <body>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  	<tr>
		<td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		<td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1">门禁信息</span></td>
              </tr>
            </table></td>
        </tr>
        <s:form action="Door_update">
         <input type="hidden" name="aid" value="<s:property value="aid"/>">
         <input type="hidden" name="did" value="<s:property value="did"/>">
         <input type="hidden" name="bid" value="<s:property value="bid"/>">
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
    	<input type="hidden" name="doorId" size="48" value="<s:property value="doorId"/>" readOnly="readonly"/></td>
	    <input type="hidden" name="doorSerial" size="48" value="<s:property value="doorSerial"/>" readOnly="readonly"/></td>
    
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">门名：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorName" size="48" value="<s:property value="doorName"/>"/></td>
    	</tr>
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">门地址：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorAddress" size="48" value="<s:property value="doorAddress"/>"/></td>
    	</tr>
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">系统编号：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorSystem" size="48" value="<s:property value="doorSystem"/>" id="doorSystem"/></td>
    	</tr>
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">Tic号：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorTic" size="48" value="<s:property value="doorTic"/>" id="doorTic"/></td>
    	</tr>
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">Chn号：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorChn" size="48" value="<s:property value="doorChn"/>" id="doorChn"/></td>
    	</tr>
    	<tr>
    		<td bgcolor="d3eaef" class="STYLE6">开门延迟时间：</td>
    		<td bgcolor="d3eaef" class="STYLE6"><input type="text" name="doorDelay" size="48" value="<s:property value="doorDelay"/>" id="doorDelay"/></td>
    	</tr>
    	
   </table>
   </s:form>
    </table></td>
    </table></td>
    </tr>
 </table>
 <center><input type="button" value="返回" onClick="history.go(-1)"/><input type="button" value="修改" onClick="return check()"/></center>
  </body>
</html>
